package com.cksecurity.controller.jsp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.cksecurity.service.UserService;

@Controller
@RequestMapping("userManage")
public class UserManageController {
    
    private Logger logger = LoggerFactory.getLogger(UserManageController.class);
    
    @Autowired
    private UserService userService;
    
    @RequestMapping("userList.do")
    public ModelAndView listAllUser() {
        ModelAndView mav = new ModelAndView("user/userList");
        logger.info("hello world");
        mav.addObject("users", userService.getAllUser());
        return mav;
    }

}
